//
//  Window.swift
//  TTTools-macOS
//
//  Created by Toj on 4/22/21.
//

import Cocoa

class Window: NSObject {
    CFArrayRef windowListAll = CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
         NSArray *arr = CFBridgingRelease(windowListAll);
         for (NSMutableDictionary *entry in arr){
             if (entry == nil) { continue; }
             NSLog(@"entry:%@", entry);
             NSString *ownerName = [entry objectForKey:(id)kCGWindowOwnerName];
             NSString *titleName = [entry objectForKey:(id)kCGWindowName];
            // if ([ownerName isEqualToString:name] && titleName.length != 0){
     //            windowNumber = [[entry objectForKey:(id)kCGWindowNumber] intValue];
             }
}
